403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python313/Lib/test/test_importlib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/test/test_importlib/__pycache__/test_util.cpython-313.pyc
�

��i����SSKJr \R"S5r\R"S5r\R"S5r\R"S5rSSKrSSKJ	r	 SSK
r
SSKrSSKrSSK
r
SSKrSSKJr SS	KJr SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKr"S
S5r\R<"\\S9urr "SS
5r!\R<"\!\\\S9ur"r#"SS5r$\R<"\$\S9ur%r&"SS5r'\R<"\'\\\S9ur(r)"SS5r*\R<"\*\S9ur+r,"SS5r-\R<"\-\S9ur.r/"SS\R`5r*\Rb"\SLS5"SS\R`55r2"SS5r3"SS\R`5r4\5S :Xa\Rl"5 gg!\a SrGNGf=f!\a SrGNQf=f!\a SrGN[f=f)!�)�utilz
importlib.abc�	importlibzimportlib.machineryzimportlib.utilN)�_bootstrap_external)�support)�	os_helperc�*�\rSrSrSrSrSrSrSrg)�DecodeSourceBytesTests�%ustring ='ü'c��URRS5nURURR	U5UR5 g)N�utf-8��source�encode�assertEqualr�
decode_source)�self�source_bytess  �2C:\Python313\\Lib\test\test_importlib\test_util.py�test_ut8_default�'DecodeSourceBytesTests.test_ut8_default)s9���{�{�)�)�'�2��������0�0��>����L�c���SUR-nURS5nX!RS5:wdeURURR	U5U5 g)Nz# coding=latin-1
zlatin-1rr
�rrrs   r�test_specified_encoding�.DecodeSourceBytesTests.test_specified_encoding-sR��%����3���}�}�Y�/���}�}�W�5�5�5�5�������0�0��>��Grc��SRURUR/5nURS5nURURRU5SRURUR/55 g)Nz
r�
)�joinrrrrrrs   r�test_universal_newlines�.DecodeSourceBytesTests.test_universal_newlines3sd�����d�k�k�4�;�;�7�8���}�}�W�-��������0�0��>����D�K�K����#=�>�	@r�N)	�__name__�
__module__�__qualname__�__firstlineno__rrrr�__static_attributes__r!rrr	r	%s��
�F�M�H�@rr	c�P�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
Srg
)�ModuleFromSpecTests�?c���"SS5nURRSU"55nUR[5 URRU5nSSS5 g!,(df   g=f)Nc��\rSrSrSrSrg)�9ModuleFromSpecTests.test_no_create_module.<locals>.Loader�Bc��g�Nr!)r�modules  r�exec_module�EModuleFromSpecTests.test_no_create_module.<locals>.Loader.exec_moduleCs��rr!N)r"r#r$r%r1r&r!rr�Loaderr,Bs��
rr3�test)�	machinery�
ModuleSpec�assertRaises�ImportErrorr�module_from_spec�rr3�specr0s    r�test_no_create_module�)ModuleFromSpecTests.test_no_create_moduleAsT��	�	��~�~�(�(����:��
�
�
�{�
+��Y�Y�/�/��5�F�,�
+�
+�s�A&�&
A4c�F�"SSURR5nURRSU"55nURRU5nUR
U[R5 URURUR5 g)Nc��\rSrSrSrSrg)�CModuleFromSpecTests.test_create_module_returns_None.<locals>.Loader�Jc��gr/r!)rr;s  r�
create_module�QModuleFromSpecTests.test_create_module_returns_None.<locals>.Loader.create_moduleKs��rr!N�r"r#r$r%rCr&r!rrr3r@Js��
rr3r4)�abcr3r5r6rr9�assertIsInstance�types�
ModuleTyperr"�namer:s    r�test_create_module_returns_None�3ModuleFromSpecTests.test_create_module_returns_NoneIsr��	�T�X�X�_�_�	��~�~�(�(����:�����+�+�D�1�����f�e�&6�&6�7�������$�)�)�4rc�X^^�Sm"SS[R5m"UU4SjSURR5nURRSU"55nURRU5nURUT5 URURT5 g)Nzalready setc��\rSrSrSrg)�<ModuleFromSpecTests.test_create_module.<locals>.CustomModule�Tr!N)r"r#r$r%r&r!rr�CustomModulerOTs��rrQc�$>�\rSrSrUU4SjrSrg)�6ModuleFromSpecTests.test_create_module.<locals>.Loader�Vc�:>�T"UR5nTUlU$r/)rJr")rr;r0rQrJs   ��rrC�DModuleFromSpecTests.test_create_module.<locals>.Loader.create_moduleWs���%�d�i�i�0��"&����
rr!NrE)rQrJs��rr3rSVs
���
�
rr3r4)rHrIrFr3r5r6rr9rGrr")rr3r;r0rQrJs    @@r�test_create_module�&ModuleFromSpecTests.test_create_moduleRs������	�5�+�+�	�	�	�T�X�X�_�_�	�
�~�~�(�(����:�����+�+�D�1�����f�l�3�������$�/rc���URRS[55nURR	U5nURURUR5 g�Nr4)r5r6�objectrr9rr"rJ�rr;r0s   r�
test___name__�!ModuleFromSpecTests.test___name__`sF���~�~�(�(����:�����+�+�D�1��������$�)�)�4rc��URRS[55nURR	U5nURURU5 grZ)r5r6r[rr9r�__spec__r\s   r�
test___spec__�!ModuleFromSpecTests.test___spec__esB���~�~�(�(����:�����+�+�D�1��������$�/rc��[5nURRSU5nURR	U5nURURU5 grZ)r[r5r6rr9�assertIs�
__loader__)r�loaderr;r0s    r�test___loader__�#ModuleFromSpecTests.test___loader__jsG������~�~�(�(���8�����+�+�D�1���
�
�f�'�'��0rc���URRS[55nURR	U5nURURUR5 g)Nztest.pkg)r5r6r[rr9r�__package__�parentr\s   r�test___package__�$ModuleFromSpecTests.test___package__psH���~�~�(�(��V�X�>�����+�+�D�1������+�+�T�[�[�9rc���URRS[5SS9nURR	U5nURURUR5 g)Nr4T)�
is_package)r5r6r[rr9r�__path__�submodule_search_locationsr\s   r�
test___path__�!ModuleFromSpecTests.test___path__usM���~�~�(�(����d�(�K�����+�+�D�1��������$�*I�*I�Jrc���URRS[5SS9nSUlURRU5nUR
URUR5 g)Nr4�	some/path)�originT)	r5r6r[�has_locationrr9r�__file__rvr\s   r�
test___file__�!ModuleFromSpecTests.test___file__zsS���~�~�(�(����+�(�N�� ������+�+�D�1��������$�+�+�6rc���URRS[55nSUlSUlUR
R
U5nURURUR5 g)Nr4ruT)	r5r6r[�cachedrwrr9r�
__cached__r\s   r�test___cached__�#ModuleFromSpecTests.test___cached__�sW���~�~�(�(����:��!��� ������+�+�D�1������*�*�D�K�K�8rr!N)r"r#r$r%r<rKrWr]rargrlrrryr~r&r!rrr(r(?s5��6�5�0�5�
0�
1�:�
K�
7�9rr()rFr5rc�<�\rSrSrSrSrSrSrSrSr	Sr
S	rg
)�ResolveNameTests�z$Tests importlib.util.resolve_name().c�\�URSURRSS55 g)N�bacon�rr�resolve_name�rs r�
test_absolute�ResolveNameTests.test_absolute�s#������$�)�)�"8�"8��$�"G�Hrc�\�URSURRSS55 g)Nr��spamr�r�s r�test_absolute_within_package�-ResolveNameTests.test_absolute_within_package�s#������$�)�)�"8�"8��&�"I�Jrc��UR[5 URRSS5 SSS5 g!,(df   g=f)N�.bacon��r7r8rr�r�s r�test_no_package� ResolveNameTests.test_no_package�s0��
�
�
�{�
+��I�I�"�"�8�R�0�,�
+�
+��	�<�
A
c�\�URSURRSS55 g)Nzspam.eggs.baconr��	spam.eggsr�r�s r�test_in_package� ResolveNameTests.test_in_package�s(�����*����/�/��+�F�	Hrc�\�URSURRSS55 g)Nz
spam.bacon�..baconr�r�r�s r�test_other_package�#ResolveNameTests.test_other_package�s'���������/�/�	�;�G�	Irc��UR[5 URRSS5 SSS5 g!,(df   g=f)Nr�r�r�r�s r�test_escape�ResolveNameTests.test_escape�s0��
�
�
�{�
+��I�I�"�"�9�f�5�,�
+�
+�r�r!N)r"r#r$r%�__doc__r�r�r�r�r�r�r&r!rrr�r��s'��.�I�K�1�
H�
I�
6rr�c�p�\rSrSr"SS5rSrSrSrSrSr	S	r
S
rSrSr
S
rSrSrSrg)�
FindSpecTests�c�(�\rSrSr\SSj5rSrg)�FindSpecTests.FakeMetaFinder�Nc�
�XU4$r/r!)rJ�path�targets   r�	find_spec�&FindSpecTests.FakeMetaFinder.find_spec�s
��<@��<N�5Nrr!)NN)r"r#r$r%�staticmethodr�r&r!rr�FakeMetaFinderr��s��	�N�
�Nrr�c�d�Sn[R"U5 [R"U5nSnURRX5nX2lXBlU[RU'URRU5nURXT5 SSS5 g!,(df   g=f�N�some_modz	a loader!)r�uncacherHrIr5r6rer`�sys�modulesr�r�rrJr0rfr;�founds      r�test_sys_modules�FindSpecTests.test_sys_modules�s�����
�\�\�$�
��%�%�d�+�F� �F��>�>�,�,�T�:�D� &��"�O� &�C�K�K����I�I�'�'��-�E����U�)� �
�
�s�A?B!�!
B/c�\�Sn[R"U5 [R"U5nU?SnUR
R
X5nXBlU[RU'URRU5nURXT5 SSS5 g!,(df   g=fr�)rr�rHrIrer5r6r`r�r�r�rr�s      r�#test_sys_modules_without___loader__�1FindSpecTests.test_sys_modules_without___loader__�s�����
�\�\�$�
��%�%�d�+�F��!� �F��>�>�,�,�T�:�D�"�O� &�C�K�K����I�I�'�'��-�E����U�)� �
�
�s�A;B�
B+c�\�Sn[R"U5 [R"U5nSUlU[
RU'UR[5 URRU5 SSS5 SSS5 g!,(df   N=f!,(df   g=f�Nr�)
rr�rHrIr`r�r�r7�
ValueErrorr��rrJr0s   r�test_sys_modules_spec_is_None�+FindSpecTests.test_sys_modules_spec_is_None�sw����
�\�\�$�
��%�%�d�+�F�"�F�O� &�C�K�K����"�"�:�.��	�	�#�#�D�)�/�	 �
�/�.��	 �
�s$�AB�B�;B�
B	�B�
B+c�V�Sn[R"U5 [R"U5nURRUS5nX2lU[RU'URRU5nURXC5 SSS5 g!,(df   g=fr�)rr�rHrIr5r6r`r�r�r�r)rrJr0r;r�s     r�test_sys_modules_loader_is_None�-FindSpecTests.test_sys_modules_loader_is_None�sz����
�\�\�$�
��%�%�d�+�F��>�>�,�,�T�4�8�D�"�O� &�C�K�K����I�I�'�'��-�E����U�)�
 �
�
�s�A8B�
B(c�t�Sn[R"U5 [R"U5nU?U[RU'UR[5 URRU5 SSS5 SSS5 g![
a Naf=f!,(df   N'=f!,(df   g=fr�)rr�rHrIr`�AttributeErrorr�r�r7r�r�r�s   r� test_sys_modules_spec_is_not_set�.FindSpecTests.test_sys_modules_spec_is_not_set�s�����
�\�\�$�
��%�%�d�+�F�
��O�!'�C�K�K����"�"�:�.��	�	�#�#�D�)�/� �
��"�
��
��/�.�� �
�sE�B)�B�(B)�B�7B)�
B�B)�B�B)�
B&	�"B)�)
B7c�6�Sn[R"U5 [R"UR/S9 UR	USS4URRU55 SSS5 SSS5 g!,(df   N=f!,(df   g=f)Nr�)�	meta_path)rr��import_stater�rr�)rrJs  r�test_success�FindSpecTests.test_success�sq����
�\�\�$�
��"�"�d�.A�.A�-B�C�� � �$��d�!3�!%���!4�!4�T�!:�<�D� �
�C�C�� �
�s"� B
�/A9�(B
�9
B	�B
�

Bc�X�URURRS55 g)N�nevergoingtofindthismodule)�assertIsNonerr�r�s r�test_nothing�FindSpecTests.test_nothing�s �����$�)�)�-�-�.J�K�Lrc���SnSn[R"USS9n[R"XU5upEURRU5nUR	US5 URU[
[R55 URU[
[R55 URRU5nURXv5 SSS5 g!,(df   g=f�Nr��hamT��pkg�r�temp_module�	submoduler��assertIsNot�assertIn�sortedr�r��assertNotInr�rrJ�subname�pkg_dir�fullname�_r;�
spec_agains        r�test_find_submodule�!FindSpecTests.test_find_submodule�s�������
�
�
�d��
-���.�.���@�K�H��9�9�&�&�x�0�D����T�4�(��M�M�$��s�{�{� 3�4����X�v�c�k�k�':�;����,�,�X�6�J����Z�.�.�
-�
-�s�CC(�(
C6c�(�SnSn[R"USS9nURRU5 [R"XU5upEURRU5nUR
US5 URU[[R55 URU[[R55 URRU5nURXv5 SSS5 g!,(df   g=fr�)
rr��init�
import_moduler�r�r�r�r�r�r�r�rr�s        r�+test_find_submodule_parent_already_imported�9FindSpecTests.test_find_submodule_parent_already_importeds�������
�
�
�d��
-���I�I�#�#�D�)��.�.���@�K�H��9�9�&�&�x�0�D����T�4�(��M�M�$��s�{�{� 3�4����X�v�c�k�k�':�;����,�,�X�6�J����Z�.�.�
-�
-�s�C D�
Dc��SnSn[R"USS9n[R"XU5upESU-nURRXa5nUR	US5 URU[
[R55 URU[
[R55 URRU5nURX�5 SSS5 g!,(df   g=f�Nr�r�Tr��.r�)	rrJr�r�r�r��relnamer;r�s	         r�test_find_relative_module�'FindSpecTests.test_find_relative_modules�������
�
�
�d��
-���.�.���@�K�H��G�m�G��9�9�&�&�w�5�D����T�4�(��M�M�$��s�{�{� 3�4����X�v�c�k�k�':�;����,�,�X�6�J����Z�.�.�
-�
-�s�C
C-�-
C;c���SnSn[R"USS9n[R"XU5upESU-nUR[5 URRU5 SSS5 UR
U[[R55 UR
U[[R55 SSS5 g!,(df   Ni=f!,(df   g=fr�)
rr�r�r7r8r�r�r�r�r�)rrJr�r�r�r�r�s       r�)test_find_relative_module_missing_package�7FindSpecTests.test_find_relative_module_missing_package$s�������
�
�
�d��
-���.�.���@�K�H��G�m�G��"�"�;�/��	�	�#�#�G�,�0����T�6�#�+�+�#6�7����X�v�c�k�k�':�;�
.�
-�0�/��.�
-�s$�4C�C
�*AC�
C	�C�
C,c��UR[5 URRS5 SSS5 g!,(df   g=f)Nzmodule.name)r7�ModuleNotFoundErrorrr�r�s r�test_find_submodule_in_module�+FindSpecTests.test_find_submodule_in_module/s1���
�
�2�
3��I�I���
�.�4�
3�
3��	�;�
A	r!N)r"r#r$r%r�r�r�r�r�r�r�r�r�r�r�r�r�r&r!rrr�r��sK��O�O�
*�
*�*�*�
*�<�M�/�/�/�	<�/rr�)r�rr5c� �\rSrSrSrSrSrg)�MagicNumberTestsi<c�b�UR[URR5S5 g)N�)r�lenr�MAGIC_NUMBERr�s r�test_length�MagicNumberTests.test_length>s!������T�Y�Y�3�3�4�a�8rc�P�URURRS5 g)Ns
)�assertEndsWithrr�r�s r�test_incorporates_rn�%MagicNumberTests.test_incorporates_rnBs�����D�I�I�2�2�G�<rr!N)r"r#r$r%r�rr&r!rrr�r�<s��9�=rr�c�v�\rSrSrSr\RRr\	R"\RRSLS5S5rSrSr
SrS	rS
rSrSrS
rSr\	R*"\R.S:H=(a \R0S:HS5S5r\	R"\RRSLS5S5r\	R"\RRSLS5S5rSrSrSrSrSr Sr!Sr"Sr#Sr$\	R"\RRSLS5S5r%\	R"\RRSLS5S 5r&\	R"\RRSLS5S!5r'\	R"\RRSLS5S"5r(\	R"\RRSLS5S#5r)\	R"\RRSLS5S$5r*S%r+g)&�PEP3147TestsiLzMTests of PEP 3147-related functions: cache_from_source and source_from_cache.Nz1requires sys.implementation.cache_tag not be Nonec	��[RRSSSS5n[RRSSSSSRUR55nURURRUSS9U5 g�	N�foo�bar�baz�qux.py�__pycache__�
qux.{}.pycr���optimization��osr�r�format�tagrr�cache_from_source�rr��expects   r�test_cache_from_source�#PEP3147Tests.test_cache_from_sourceRso��
�w�w�|�|�E�5�%��:�������e�U�E�=�*�1�1�$�(�(�;�=��������4�4�T��4�K��	!rc��[R"[RSS5 UR	[
5 URRS5 SSS5 SSS5 g!,(df   N=f!,(df   g=f)N�	cache_tagzwhatever.py)r�	swap_attrr��implementationr7�NotImplementedErrorrrr�s r�#test_cache_from_source_no_cache_tag�0PEP3147Tests.test_cache_from_source_no_cache_tag]sZ��
�
�
�s�1�1�;��
E��"�"�#6�7��	�	�+�+�M�:�8�F�
E�7�7��F�
E�s"�A;�A*�A;�*
A8	�4A;�;
B	c��[RRSS5n[RRSSSRUR55nURURRUSS9U5 g)Nzfoo.bar�filer
z
file{}.pycr�rrrs   r�test_cache_from_source_no_dot�*PEP3147Tests.test_cache_from_source_no_dotcse���w�w�|�|�I�v�.�������i��*�1�1�$�(�(�;�=��������4�4�T��4�K��	!rc	��[RRSSSS5n[R"5 [R
"S5 UR
URRUS5URRUSS95 UR
URRUS	5URRUS
S95 SSS5 [R"5 [R
"S5 UR[5 URRUS5 SSS5 UR[5 URRUS	5 SSS5 SSS5 g!,(df   N�=f!,(df   Nb=f!,(df   N9=f!,(df   g=f)Nr	r
rr�ignoreF�rTr��error)rr�r�warnings�catch_warnings�simplefilterrrrr7�DeprecationWarning�rr�s  r�%test_cache_from_source_debug_override�2PEP3147Tests.test_cache_from_source_debug_overrideksC���w�w�|�|�E�5�%��:��
�
$�
$�
&��!�!�(�+����T�Y�Y�8�8��u�E�!�Y�Y�8�8��A�8�N�
P����T�Y�Y�8�8��t�D�!�Y�Y�8�8��B�8�O�
Q�	'��
$�
$�
&��!�!�'�*��"�"�#5�6��	�	�+�+�D�%�8�7��"�"�#5�6��	�	�+�+�D�$�7�7�	'�
&�
'�
&��7�6��6�6��	'�
&�sH�BF�4,F;� F�=F;�F*�7F;�
F�
F'	�#F;�*
F8	�4F;�;
G	c���Sn[RRSSRUR55nURURRUSS9U5 g�N�foo.pyr
z
foo.{}.pycr�rrrs   r�test_cache_from_source_cwd�'PEP3147Tests.test_cache_from_source_cwd|sQ���������m�\�-@�-@����-J�K��������4�4�T��4�K��	!rc	��[RRSSS5n"SS5n[R"5 [R
"S5 UR
URRU/5URRUSS95 UR
URRUS	/5URRUS
S95 UR[5 URRSU"55 SSS5 SSS5 g!,(df   N=f!,(df   g=f)Nr	r
zbaz.pyc��\rSrSrSrSrg)�=PEP3147Tests.test_cache_from_source_override.<locals>.Bearishi�c��[er/)�RuntimeErrorr�s r�__bool__�FPEP3147Tests.test_cache_from_source_override.<locals>.Bearish.__bool__�s��l� 2rr!N)r"r#r$r%r:r&r!rr�Bearishr7�s��2rr<r&r'r�r�z/foo/bar/baz.py)rr�rr)r*r+rrrr7r9)rr�r<s   r�test_cache_from_source_override�,PEP3147Tests.test_cache_from_source_override�s����w�w�|�|�E�5�(�3��	3�	3�
�
$�
$�
&��!�!�(�+����T�Y�Y�8�8��r�B�!�Y�Y�8�8��A�8�N�
P����T�Y�Y�8�8���t�D�!�Y�Y�8�8��B�8�O�
Q��"�"�<�0��	�	�+�+�,=�w�y�I�1�
'�
&�1�0��
'�
&�s%�B5D:�6"D)�D:�)
D7	�3D:�:
Ec���Sn[RRSSRUR55nURURRUSS9U5 gr1rrs   r�0test_cache_from_source_optimization_empty_string�=PEP3147Tests.test_cache_from_source_optimization_empty_string�sQ���������m�\�-@�-@����-J�K��������4�4�T��4�K��	!rc��Sn[RRn[RRSSR
UR55nUS:XaUS-nO=US::aUSR
U5-nO"SR
U5nURU5 URURRUSS	9W5 g)
Nr2r
�foo.{}r�.pyc��.opt-{}.pycz){!r} is a non-standard optimization levelr)r��flags�optimizerr�rrr�skipTestrrr)rr��optimization_level�
almost_expectr�msgs      r�(test_cache_from_source_optimization_None�5PEP3147Tests.test_cache_from_source_optimization_None�s����� �Y�Y�/�/�������]�H�O�O�D�H�H�4M�N�
���"�"�V�+�F�
�1�
$�"�]�%9�%9�:L�%M�M�F�=�D�D�EW�X�C��M�M�#��������4�4�T��4�M��	!rc�"�Sn[R[R-n[RRSSR
UR55nURRXS9nURUUSR
U5-5 URURRUSS9US-5 UR[5 URRUSS9 SSS5 g!,(df   g=f)	Nr2r
rDrrG�*z.opt-42.pyczpath/is/bad)
�string�
ascii_letters�digitsrr�rrrrrrr7r�)rr��valid_charactersrL�gots     r�'test_cache_from_source_optimization_set�4PEP3147Tests.test_cache_from_source_optimization_set�s�����!�/�/�&�-�-�?�������]�H�O�O�D�H�H�4M�N�
��i�i�)�)�$�)�N������&��)=�)=�>N�)O�O�	Q�	
������4�4�T��4�K�&��6�	8��
�
�z�
*��I�I�'�'��=�'�I�+�
*�
*�s�D�
Dc�"�[R"5 [R"S5 UR[5 UR
R
SSSS9 SSS5 SSS5 g!,(df   N=f!,(df   g=f)Nr&r2Fr�r)r)r*r+r7�	TypeErrorrrr�s r�;test_cache_from_source_debug_override_optimization_both_set�HPEP3147Tests.test_cache_from_source_debug_override_optimization_both_set�s`��
�
$�
$�
&��!�!�(�+��"�"�9�-��	�	�+�+�H�e�"�+�M�.�'�
&�-�-��'�
&�s#�,B�A/�B�/
A=	�9B�
B�\�/z/test meaningful only where os.altsep is definedc��URURRSSS9SRUR55 g)Nz\foo\bar\baz/qux.pyr�rz#\foo\bar\baz\__pycache__\qux.{}.pyc)rrrrrr�s r�)test_sep_altsep_and_sep_cache_from_source�6PEP3147Tests.test_sep_altsep_and_sep_cache_from_source�s=��	
����I�I�'�'�(@�r�'�R�6�=�=�d�h�h�G�	Irc	��[R"SSSS5n[RR	SSSSSRUR55nURURRUSS9U5 gr)
�pathlib�PurePathrr�rrrrrrrs   r�$test_cache_from_source_path_like_arg�1PEP3147Tests.test_cache_from_source_path_like_arg�sm������u�e�X�>�������e�U�E�=�*�1�1�$�(�(�;�=��������4�4�T��4�K��	!rz4requires sys.implementation.cache_tag to not be Nonec	��[RRSSSSSRUR55n[RRSSSS5nURURRU5U5 g�Nr	r
rr
rr�rr�rrrrr�source_from_cachers   r�test_source_from_cache�#PEP3147Tests.test_source_from_cache�sg��
�w�w�|�|�E�5�%��(�/�/����9�;�������e�U�E�8�<��������4�4�T�:�F�Crc�Z�[RRSSS5n[R"[
RSS5 UR[5 URRU5 SSS5 SSS5 g!,(df   N=f!,(df   g=f)N�blahr
zwhatever.pycr)rr�rrrr�rr7rrrjr-s  r�#test_source_from_cache_no_cache_tag�0PEP3147Tests.test_source_from_cache_no_cache_tag�sp���w�w�|�|�F�M�>�B��
�
�
�s�1�1�;��
E��"�"�#6�7��	�	�+�+�D�1�8�F�
E�7�7��F�
E�s$�B�B�:B�
B	�B�
B*c�Z�UR[URRS5 g)Nz/foo/bar/bazqux.pyc�r7r�rrjr�s r�test_source_from_cache_bad_path�,PEP3147Tests.test_source_from_cache_bad_path�s%��	
�����	�	�3�3�5J�	Lrc�Z�UR[URRS5 g)Nzfoo.cpython-32.pycrrr�s r�test_source_from_cache_no_slash�,PEP3147Tests.test_source_from_cache_no_slash�s#�������	�	�3�3�5I�	Krc�Z�UR[URRS5 g)Nz__pycache__/foo.pycrrr�s r�#test_source_from_cache_too_few_dots�0PEP3147Tests.test_source_from_cache_too_few_dots�s#�������	�	�3�3�5J�	Lrc��UR[5 URRS5 SSS5 g!,(df   g=f)Nz(__pycache__/foo.cpython-32.opt-1.foo.pycrrr�s r�$test_source_from_cache_too_many_dots�1PEP3147Tests.test_source_from_cache_too_many_dots�s2��
�
�
�z�
*��I�I�'�'�>�
@�+�
*�
*�r�c�Z�UR[URRS5 g)Nz"__pycache__/foo.cpython-32.foo.pycrrr�s r�test_source_from_cache_not_opt�+PEP3147Tests.test_source_from_cache_not_opt�s"�������	�	�3�3�0�	2rc�Z�UR[URRS5 g)Nz/foo/bar/foo.cpython-32.foo.pycrrr�s r�$test_source_from_cache_no__pycache__�1PEP3147Tests.test_source_from_cache_no__pycache__s"�������	�	�3�3�-�	/rc���[RRSSRUR55nURURRU5S5 g)Nr
zfoo.{}.opt-1.pycr2rir-s  r�)test_source_from_cache_optimized_bytecode�6PEP3147Tests.test_source_from_cache_optimized_bytecodesE���w�w�|�|�M�+=�+D�+D�T�X�X�+N�O��������4�4�T�:�H�Erc�
�[RRSSRUR55nUR[5 URRU5 SSS5 g!,(df   g=f)Nr
zfoo.{}.opt-.pyc)	rr�rrrr7r�rrjr-s  r�+test_source_from_cache_missing_optimization�8PEP3147Tests.test_source_from_cache_missing_optimizationsR���w�w�|�|�M�+<�+C�+C�D�H�H�+M�N��
�
�
�z�
*��I�I�'�'��-�+�
*�
*�s�A4�4
Bc	��[R"SSSSSRUR55n[R
R
SSSS5nURURRU5U5 grh)
rcrdrrrr�rrrrjrs   r�$test_source_from_cache_path_like_arg�1PEP3147Tests.test_source_from_cache_path_like_argse������u�e�]� ,� 3� 3�D�H�H� =�?�������e�U�E�8�<��������4�4�T�:�F�Crc��[RR[RRSS5[RR[RRSS5[RR[RRSS5[RR-/nSn[RS:XaSnUVs/sHo2U3PM
 nnUSS	/-
nUH�nURUS
9 U[RR[RRSSS
S5-n[RRUSSS
SR
UR55n[R"U5 URURRUSS9U5 SSS5 SSS5 M� gs snf!,(df   N =f!,(df   GM	=f)N�tmp�bytecodeu☃ztrailing-slashr��ntzC:z
\\?\C:\fooz\\localhost\c$\bar)r�r	r
rrrr)rr�r�seprJ�subTestrrr�temporary_pycache_prefixrr)r�pycache_prefixes�drive�prefix�pycache_prefixr�rs       r�.test_cache_from_source_respects_pycache_prefix�;PEP3147Tests.test_cache_from_source_respects_pycache_prefixs���
�G�G�L�L������e�Z�8��G�G�L�L������e�X�6��G�G�L�L������e�-=�>������L�
��
��
�7�7�d�?��E�1A� C�1A�v�'�&��"�1A�
� C���0E� F�F��.�N����>��2��r�w�w�|�|��G�G�K�K���u�h� @�@�������"�E�5�%� �'�'����1�3���2�2�>�B��$�$��	�	�3�3�D�r�3�J�� �C�
3�2�/�� C�C�B��
3�2�s+�"G�BG5�+G$�
G5�$
G2�.G5�5
H	c
��[RR[RRSS5n[RRSSSS5n[RR	[R
"55S[RR-n[RRU[RR
[R
"5U5SSSSURS	35n[R"U5 URURRUS
S9[RRU55 SSS5 g!,(df   g=f)Nr�r�r	r
rrr�qux.rEr�r)
rr�rr��
splitdrive�getcwd�relpathrrr�rr�normpath)rr�r��rootrs     r�7test_cache_from_source_respects_pycache_prefix_relative�DPEP3147Tests.test_cache_from_source_respects_pycache_prefix_relative6s��������b�g�g�k�k�5�*�E���w�w�|�|�E�5�%��:���w�w�!�!�"�)�)�+�.�q�1�B�G�G�K�K�?���������G�G�O�O�B�I�I�K��.��5�%�4����z��!6�8���
*�
*�>�
:�����	�	�+�+�D�r�+�B���� � ��(�
*�;�
:�
:�s
�%AE6�6
Fc� �[RR[RRSS5nSn[RR[RRSSSURS35n[
R"U5 [R"S5 URUR
RU5U5 SSS5 SSS5 g!,(df   N=f!,(df   g=f)Nr�r�rr�rEr^)rr�rr�rrr�r�
change_cwdrr�rr�r�rs    r�2test_cache_from_source_in_root_with_pycache_prefix�?PEP3147Tests.test_cache_from_source_in_root_with_pycache_prefixHs��������b�g�g�k�k�5�*�E���������b�g�g�k�k�5�*� $�T�X�X�J�d�3�5��
�
*�
*�>�
:��%�%�c�*�� � ����!<�!<�T�!B�F�K�+�;�
:�*�*��;�
:�s$�C?�1,C.�C?�.
C<	�8C?�?
D
c	��[RR[RRSS5n[RRUSSSSURS35n[RR[RRSSSS5n[
R"U5 URUR
RU5U5 SSS5 g!,(df   g=f)	Nr�r�r	r
rr�rEr�	rr�rr�rrr�rrjr�s    r�,test_source_from_cache_inside_pycache_prefix�9PEP3147Tests.test_source_from_cache_inside_pycache_prefixTs��������b�g�g�k�k�5�*�E���w�w�|�|�N�E�5�%�"�4�8�8�*�D�1�3�������b�g�g�k�k�5�%���I��
�
*�
*�>�
:����T�Y�Y�8�8��>��G�;�
:�
:�s�<,C1�1
C?c	���[RR[RRSS5n[RRSSSSSURS35n[RRSSSS	5n[
R"U5 URUR
RU5U5 SSS5 g!,(df   g=f)
Nr�r�r	r
rr
r�rErr�r�s    r�-test_source_from_cache_outside_pycache_prefix�:PEP3147Tests.test_source_from_cache_outside_pycache_prefixas��������b�g�g�k�k�5�*�E���w�w�|�|�E�5�%��"�4�8�8�*�D�1�3�������e�U�E�8�<��
�
*�
*�>�
:����T�Y�Y�8�8��>��G�;�
:�
:�s�#,C�
C&r!),r"r#r$r%r�r�rrr�unittest�skipIfrrr#r.r3r>rArNrWr[�
skipUnlessrr��altsepr`rerkrorsrvryr|rr�r�r�r�r�r�r�r�r�r&r!rrrrLs���W�

�
�
�
&�
&�C�
�_�_�S�'�'�1�1�T�9�H�J�!�J�!�;�!�8�"!�J�$!�!� J�"N�������4��<�B�I�I��,<�F�H�I�H�I��_�_�S�'�'�1�1�T�9�H�J�!�J�!��_�_�S�'�'�1�1�T�9�K�M�D�M�D�2�L�K�
L�
@�
2�/�F�
.��_�_�S�'�'�1�1�T�9�K�M�D�M�D��_�_�S�'�'�1�1�T�9�K�M� �M� �6�_�_�S�'�'�1�1�T�9�K�M�*�M�*� �_�_�S�'�'�1�1�T�9�K�M�L�M�L��_�_�S�'�'�1�1�T�9�K�M�	H�M�	H��_�_�S�'�'�1�1�T�9�K�M�	H�M�	Hrrc�x�\rSrSrSr\R"\RRS;S5S5r
Srg)r�itz9
Test release compatibility issues relating to importlib
)�	candidate�finalz8only applies to candidate or final python release levelsc��Sn[R[RRSSS5nSnURXU5 g)Ni�
rF�littlea�To avoid breaking backwards compatibility with cached bytecode files that can't be automatically regenerated by the current user, candidate and final releases require the current  importlib.util.MAGIC_NUMBER to match the expected magic number in this test. Set the expected magic number in this test to the current MAGIC_NUMBER to continue with the release.

Changing the MAGIC_NUMBER for a maintenance release requires discussion in python-dev and notification of community stakeholders.)�int�
from_bytesrrr�r)r�EXPECTED_MAGIC_NUMBER�actualrMs    r�test_magic_number�"MagicNumberTests.test_magic_numberxsH��&!%�����	��� ;� ;�B�Q� ?��J��	
&�	�	
���.��<rr!N)r"r#r$r%r�r�r�r��version_info�releaselevelr�r&r!rrr�r�ts>���������%�%�)?�?�B��=�	�=rzsubinterpreters requiredc��\rSrSrSrSr\R"\SLS5\	R"5S55r\R"\SLS5\	R"S5S	55r\R"\SLS5S
5rSrg)�,IncompatibleExtensionModuleRestrictionsTestsi�c��^�[R"S5mU4SjnURU5 [R"TU5nUb0URR
S:Xa[
UR5egg)N�isolatedc�h>�[R"T5 g![Ra gf=fr/��
_interpreters�destroy�InterpreterNotFoundError��interpids�r�ensure_destroyed�WIncompatibleExtensionModuleRestrictionsTests.run_with_own_gil.<locals>.ensure_destroyed��.���
��%�%�h�/�� �9�9�
��
����1�1r8�r��create�
addCleanup�exec�typer"r8rM�r�scriptr��excsnapr�s    @r�run_with_own_gil�=IncompatibleExtensionModuleRestrictionsTests.run_with_own_gil�sj��� �'�'�
�3��	�
	
���(�)��$�$�X�v�6�����|�|�$�$�
�5�!�'�+�+�.�.�6�rc��^�[R"S5mU4SjnURU5 [R"TU5nUb0URR
S:Xa[
UR5egg)N�legacyc�h>�[R"T5 g![Ra gf=fr/r�r�s�rr��ZIncompatibleExtensionModuleRestrictionsTests.run_with_shared_gil.<locals>.ensure_destroyed�r�r�r8r�r�s    @r�run_with_shared_gil�@IncompatibleExtensionModuleRestrictionsTests.run_with_shared_gil�sj��� �'�'��1��	�
	
���(�)��$�$�X�v�6�����|�|�$�$�
�5�!�'�+�+�.�.�6�rNz%test requires _testsinglephase modulec��[R"S5nURS5 URU5 SSS5 URS5 UR	U5 SSS5 [R"S5nURS5 UR[5 URU5 SSS5 SSS5 URS5 UR[5 UR	U5 SSS5 SSS5 g!,(df   N�=f!,(df   N�=f!,(df   N�=f!,(df   N�=f!,(df   N[=f!,(df   g=f)Nz�
            from importlib.util import _incompatible_extension_module_restrictions
            with _incompatible_extension_module_restrictions(disable_check=True):
                import _testsinglephase
            �check disabled, shared GIL�#check disabled, per-interpreter GILz�
            from importlib.util import _incompatible_extension_module_restrictions
            with _incompatible_extension_module_restrictions(disable_check=False):
                import _testsinglephase
            �check enabled, shared GIL�"check enabled, per-interpreter GIL)�textwrap�dedentr�r�r�r7r8�rr�s  r�test_single_phase_init_module�JIncompatibleExtensionModuleRestrictionsTests.test_single_phase_init_module�s��
���"���
�\�\�6�
7��$�$�V�,�8�
�\�\�?�
@��!�!�&�)�A����&
���
�\�\�5�
6��"�"�;�/��(�(��0�0�7��\�\�>�
?��"�"�;�/��%�%�f�-�0�@�
?�8�
7��
@�
@��0�/��7�
6��0�/��@�
?�s_�D�D'�E	�*D8�<E	�E+�3E�E+�
D$�'
D5�8
E	�E	�	
E�
E(	�$E+�+
E9z$test requires _testmultiphase modulez/gh-117649: not supported in free-threaded buildc	�8�[R(aSnOSn[R"SUS[R
<SUS35nU[R"S5-nUR
S5 URU5 SSS5 UR
S	5 URU5 SSS5 U[R"S
5-nUR
S5 URU5 SSS5 UR
S5 UR[5 URU5 SSS5 SSS5 g!,(df   N�=f!,(df   N�=f!,(df   Nz=f!,(df   NJ=f!,(df   g=f)
N�AppleFrameworkLoader�ExtensionFileLoaderzw
            from importlib.util import spec_from_loader, module_from_spec
            from importlib.machinery import zD

            name = '_test_shared_gil_only'
            filename = z
            loader = zP(name, filename)
            spec = spec_from_loader(name, loader)

            a

            from importlib.util import _incompatible_extension_module_restrictions
            with _incompatible_extension_module_restrictions(disable_check=True):
                module = module_from_spec(spec)
                loader.exec_module(module)
            r�r�a
            from importlib.util import _incompatible_extension_module_restrictions
            with _incompatible_extension_module_restrictions(disable_check=False):
                module = module_from_spec(spec)
                loader.exec_module(module)
            r�r�)r�is_apple_mobiler�r��_testmultiphaserxr�r�r�r7r8)rrf�	prescriptr�s    r�'test_incomplete_multi_phase_init_module�TIncompatibleExtensionModuleRestrictionsTests.test_incomplete_multi_phase_init_module�sV��
�"�"�+�F�*�F��O�O�)-�-3�H�5�(�0�0�3�4��X�
�
	%�	�	��X�_�_�.�����\�\�6�
7��$�$�V�,�8�
�\�\�?�
@��!�!�&�)�A��X�_�_�.�����\�\�5�
6��$�$�V�,�7�
�\�\�>�
?��"�"�;�/��%�%�f�-�0�@�
?�8�
7��
@�
@��7�
6��0�/��@�
?�sH�4E�E�#E)�F�$E:�6F�
E�
E&�)
E7�:
F	�F�
Fc�<�[R"S5nURS5 URU5 SSS5 URS5 UR	U5 SSS5 [R"S5nURS5 URU5 SSS5 URS5 UR	U5 SSS5 g!,(df   N�=f!,(df   N�=f!,(df   N\=f!,(df   g=f)Nz�
            from importlib.util import _incompatible_extension_module_restrictions
            with _incompatible_extension_module_restrictions(disable_check=True):
                import _testmultiphase
            r�r�z�
            from importlib.util import _incompatible_extension_module_restrictions
            with _incompatible_extension_module_restrictions(disable_check=False):
                import _testmultiphase
            r�r�)r�r�r�r�r�r�s  r�%test_complete_multi_phase_init_module�RIncompatibleExtensionModuleRestrictionsTests.test_complete_multi_phase_init_modules������"���
�\�\�6�
7��$�$�V�,�8�
�\�\�?�
@��!�!�&�)�A����&
���
�\�\�5�
6��$�$�V�,�7�
�\�\�>�
?��!�!�&�)�@�
?�8�
7��
@�
@��7�
6��
?�
?�s/�C�C+�C<�?D
�
C(�+
C9�<
D
�
Dr!)r"r#r$r%r�r�r�r��_testsinglephaser� expected_failure_if_gil_disabledr�r��requires_gil_enabledr�r�r&r!rrr�r��s���/�/��_�_�%��-�/V�W�
�-�-�/�.�0�X�.�.�_�_�_��,�.T�U��!�!�"S�T�(.�U�V�(.�T�_�_�_��,�.T�U�*�V�*rr�c�*�\rSrSrSSjrSrSrSrg)�PatchAtomicWritesic�8�XlX lSUl/Ulg)NF)�truncate_at_length�never_complete�
seen_write�	_children)rr�r�s   r�__init__�PatchAtomicWrites.__init__s��"4��,�������rc�^^�SSKn[RmUU4Sjn[R"[
SU5[R"[SU5/TlTRHnUR5 M T$)Nrc�>�TR(aTR(agSTlT"XSTR5$)NT)r�r�r�)�fd�data�oldwriters  ��r�write�*PatchAtomicWrites.__enter__.<locals>.write%s5������4�#6�#6��"�D�O��B�%=�d�&=�&=� >�?�?r�_ior)�_pyiorrrrr�children�	__enter__)rrr�childrs`   @rr
�PatchAtomicWrites.__enter__sd�����8�8��	@�
���1�5�%�@����b�'�5�1�
��
��]�]�E��O�O��#��rc�N�URHnURXU5 M gr/)r	�__exit__)r�exc_type�exc_val�exc_tbrs     rr�PatchAtomicWrites.__exit__5s���]�]�E��N�N�8�f�5�#r)r�r	r�r�r�N)F)r"r#r$r%r�r
rr&r!rrr�r�s����,6rr�c� �\rSrSrSrSrSrg)�	MiscTestsi:c���SnUS-n[US9nSU-n[R"[RU5 SSS5 URWR5 UR[R"[RR5RU5 [R"[RR5 g!,(df   N�=f)N�drF)r��x)
r�r�
_write_atomicr�TESTFN�
assertTruer�rr�statr�st_size�unlink)rr��length�cm�contents     r�+test_atomic_write_retries_incomplete_writes�5MiscTests.test_atomic_write_retries_incomplete_writes<s��� ��#�a�'��
�2D�
E���V�m�G��-�-�i�.>�.>��H�	F�
	
����
�
�&��������!2�!2�!9�!9�:�B�B�F�K�
�	�	�'�#�#�*�*�+�F�
E�s�+C�
C$c��Sn[USS9nUR[5 SUS--n[R"[
RU5 SSS5 SSS5 URWR5 UR[5 [R"[R
R5 SSS5 g!,(df   N~=f!,(df   N�=f!,(df   g=f)NrT)r�r�rrF)r�r7�OSErrorrrrrrr�rrr)rr�rr s    r�.test_atomic_write_errors_if_unable_to_complete�8MiscTests.test_atomic_write_errors_if_unable_to_completeJs��� ��
�#5�d�
�����g�&��0�1�4�5�G��-�-�i�.>�.>��H�
'�
�	
����
�
�&�
�
�
�w�
'��G�G�G�%�%�,�,�-�(�
'�
'�&��
�
��(�
'�s.�C�.C	�C�/C+�	
C	�C�
C(�+
C9r!N)r"r#r$r%r!r%r&r!rrrr:s��,�.rr�__main__)7�test.test_importlibr�import_importlibrFr�r5�importlib_util�importlib.utilrrrrc�rerRr�r4r�test.supportrr�rHr��
unittest.mockr)r�r8r�r�r�r	�	test_both�Frozen_DecodeSourceBytesTests�Source_DecodeSourceBytesTestsr(�Frozen_ModuleFromSpecTests�Source_ModuleFromSpecTestsr��Frozen_ResolveNameTests�Source_ResolveNameTestsr��Frozen_FindSpecTests�Source_FindSpecTestsr��Frozen_MagicNumberTests�Source_MagicNumberTestsr�Frozen_PEP3147Tests�Source_PEP3147Tests�TestCaser�r�r�rr"�mainr!rr�<module>r>sL��$�
���O�,�����[�)���!�!�"7�8�	��&�&�'7�8���)�	��	�
�
��"������������
@�@�.
�^�^�*��@����F9�F9�T	�N�N�&�C�9�&�(����
6�6�F
�^�^�$�>�:����@/�@/�J
�^�^�M��>�#,�.����
=�=�
�^�^�$�>�:����`H�`H�J	
�^�^�L�~�6����&=�x�(�(�&=�R
����$�&�(B�C�w*�8�3D�3D�w*�D�w*�t6�6�D .��!�!� .�F�z���M�M�O���I���������O������M��s6�G�G�G,�G�G�G)�(G)�,G8�7G8

Youez - 2016 - github.com/yon3zu
LinuXploit